#!/bin/sh
#
# Netopeer2-server Starts netopeer2-server.
#
NETOPEER2_SERVER=/usr/bin/netopeer2-server
start() {
	printf "Starting Netopeer2-server: "
	${NETOPEER2_SERVER}
	echo "OK"
}
stop() {
	printf "Stopping Netopeer2-server: "
	killall $(basename ${NETOPEER2_SERVER})
	echo "OK"
}
restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac
